package spring.module.scheduling;

import java.time.LocalTime;

import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * 同步任务
 * 
 * @author Lucky Yang

 */
@Component
@Slf4j
public class SyncTask {

    public void doTaskOne() throws Exception {
        LocalTime start = LocalTime.now();
        int costTime = Nap.random(1000);
        log.info("开始做【同步】任务一[{}][{}]", costTime, start);
    }

    public void doTaskTwo() throws Exception {
        LocalTime start = LocalTime.now();
        int costTime = Nap.random(1000);
        log.info("开始做【同步】任务二[{}][{}]", costTime, start);        
    }
}
